package com.flowerplus.store.common.data.http.glide;

import android.content.Context;

import com.bumptech.glide.Glide;
import com.bumptech.glide.GlideBuilder;
import com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory;
import com.bumptech.glide.module.GlideModule;

/**
 * Created by z on.
 * Des:
 * Date: 2017/4/6
 */

public class GlideCacheModule implements GlideModule {
    @Override
    public void applyOptions(Context context, GlideBuilder builder) {
        int size = 300 * 1024 * 1024;
        String fileName = "";
        builder.setDiskCache(new InternalCacheDiskCacheFactory(context, fileName, size));
    }

    @Override
    public void registerComponents(Context context, Glide glide) {

    }
}
